package ar.edu.unq.tpi.uis.tepe3.wicket.components;

import ar.edu.unq.tpi.uis.tepe3.dominio.Group;
import ar.edu.unq.tpi.uis.tepe3.dominio.User;
import ar.edu.unq.tpi.uis.tepe3.wicket.pages.FolderPage;
import ar.edu.unq.tpi.uis.tepe3.wicket.pages.UserPage;

@SuppressWarnings("serial")
public class UserToGroupForm extends AbstractUserToGroupForm<User, Group> {

	public UserToGroupForm(String id, User object) {
		super(id, object);
	}

	@Override
	protected Class<Group> getSelectableClass() {
		return Group.class;
	}

	@Override
	protected void redirectToListPage() {
		this.setResponsePage(UserPage.class);
	}
	
	@Override
	protected void asignar(Group selected) {
		this.getObject().addGroup(selected);
	}

}
